package com.gopay.common.domain.oldmermove;

// Generated 2014-7-3 15:52:13 by Hibernate Tools 3.4.0.CR1

import java.util.Date;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Table;

import com.gopay.common.constants.oldmermove.OldMerTranEffectStatus;
import com.gopay.common.constants.oldmermove.OldMerTranOpenStatus;

/**
 * 老平台迁移商户开通交易记录
 * @OldMovedMerOpenTran.java
 * @author lizheng
 * @2014-7-3 下午4:26:50  www.gopay.com.cn Inc.All rights reserved.
 */
@Entity
@Table(name = "OLD_MOVED_MER_OPEN_TRAN")
public class OldMovedMerOpenTran implements java.io.Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = 1L;
    private OldMovedMerOpenTranId id;
    private String gatewayVersion;
    private OldMerTranOpenStatus openStatus;
    private String resultMsg;
    private Date createdTs;
    private Date lastUpdTs;
    /** 生效状态 */
    private OldMerTranEffectStatus effectStatus;
    /** 设定的生效时间 */
    private Date setupEffectTs;

    public OldMovedMerOpenTran() {
    }

    public OldMovedMerOpenTran(OldMovedMerOpenTranId id, OldMerTranOpenStatus openStatus) {
        this.id = id;
        this.openStatus = openStatus;
    }

    public OldMovedMerOpenTran(OldMovedMerOpenTranId id, String gatewayVersion, OldMerTranOpenStatus openStatus,
            String resultMsg, Date createdTs, Date lastUpdTs) {
        this.id = id;
        this.gatewayVersion = gatewayVersion;
        this.openStatus = openStatus;
        this.resultMsg = resultMsg;
        this.createdTs = createdTs;
        this.lastUpdTs = lastUpdTs;
    }

    @EmbeddedId
    @AttributeOverrides({
            @AttributeOverride(name = "merId", column = @Column(name = "MER_ID", nullable = false, length = 10)),
            @AttributeOverride(name = "tranCode", column = @Column(name = "TRAN_CODE", nullable = false, length = 10)) })
    public OldMovedMerOpenTranId getId() {
        return this.id;
    }

    public void setId(OldMovedMerOpenTranId id) {
        this.id = id;
    }

    @Column(name = "GATEWAY_VERSION", length = 5)
    public String getGatewayVersion() {
        return this.gatewayVersion;
    }

    public void setGatewayVersion(String gatewayVersion) {
        this.gatewayVersion = gatewayVersion;
    }

    @Column(name = "OPEN_STATUS", nullable = false)
    @Enumerated(EnumType.ORDINAL)
    public OldMerTranOpenStatus getOpenStatus() {
        return this.openStatus;
    }

    public void setOpenStatus(OldMerTranOpenStatus openStatus) {
        this.openStatus = openStatus;
    }

    @Column(name = "RESULT_MSG", length = 100)
    public String getResultMsg() {
        return this.resultMsg;
    }

    public void setResultMsg(String resultMsg) {
        this.resultMsg = resultMsg;
    }

    @Column(name = "CREATED_TS")
    public Date getCreatedTs() {
        return this.createdTs;
    }

    public void setCreatedTs(Date createdTs) {
        this.createdTs = createdTs;
    }

    @Column(name = "LAST_UPD_TS")
    public Date getLastUpdTs() {
        return this.lastUpdTs;
    }

    public void setLastUpdTs(Date lastUpdTs) {
        this.lastUpdTs = lastUpdTs;
    }

    @Column(name = "EFFECT_STATUS", nullable = false)
    @Enumerated(EnumType.ORDINAL)
    public OldMerTranEffectStatus getEffectStatus() {
        return effectStatus;
    }

    public void setEffectStatus(OldMerTranEffectStatus effectStatus) {
        this.effectStatus = effectStatus;
    }

    @Column(name = "SETUP_EFFECT_TS")
    public Date getSetupEffectTs() {
        return setupEffectTs;
    }

    public void setSetupEffectTs(Date setupEffectTs) {
        this.setupEffectTs = setupEffectTs;
    }
}
